﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _16_State
{

    public class Worker 
    {
        public Worker()
        {
            CurState = new ForenoonState();
        }
        public int Hour
        {
            get;set;
        }

        public bool TaskFinished
        {
            get;set;
        }

        public State CurState
        {
            get;set;
        }

        public void WriteProgram()
        {
            CurState.WriteProgram(this);
        }

        public void SetState(State nextState)
        {
            if (CurState != nextState)
            {
                CurState = nextState;
            }
        }
    }

}
